<!--档案专题-->
<template>
  <div class="archive-special">
    <left-tree
      :isShowLeftTree.sync="isShowLeftTree"
      :treeData="treeData">
    </left-tree>
    <div class="archive-right" :style="{width: (isShowLeftTree ? 'calc(100% - 2px)': '82%')}">
      <splitpanes horizontal>
        <pane size="60">
          <a-card size="small" :headStyle="{ background: '#f9f9f9' }" :bodyStyle="{ height: 'calc(100% - 48px)' }">
            <div slot="title">
              <div class="top-icon">
                <icon-font type="icon-zhuanti" />
              </div>
              <span>档案专题</span>
            </div>
            <div slot="extra">
              <a-button type="primary" icon="plus" class="icon-button">档案专题</a-button>
            </div>
            <el-table
              :data="archiveTableData"
              highlight-current-row
              border
              height="100%"
              :row-style="{height:'40px'}"
              :cell-style="{padding:'0px'}"
              :header-cell-style="{background: '#FAFAFA', padding: 0, height: '40px', color: '#666666'}"
              style="width: 100%">
              <el-table-column
                type="selection"
                width="50">
              </el-table-column>
              <slot v-for="(item,index) in archiveColumns">
                <el-table-column
                  :key="index"
                  :property="item.field"
                  :label="item.title"
                  :width="item.width"
                  show-overflow-tooltip
                  sortable>
                </el-table-column>
              </slot>
            </el-table>
          </a-card>
        </pane>
        <pane size="40">
          <el-table
            :data="fullTableData"
            highlight-current-row
            border
            height="100%"
            :row-style="{height:'40px'}"
            :cell-style="{padding:'0px'}"
            :header-cell-style="{background: '#FAFAFA', padding: 0, height: '40px', color: '#666666'}"
            style="width: 100%">
            <slot v-for="(item,index) in fullColumns">
              <el-table-column
                :key="index"
                :property="item.field"
                :label="item.title"
                :width="item.width"
                show-overflow-tooltip
                sortable>
              </el-table-column>
            </slot>
          </el-table>
        </pane>
      </splitpanes>
    </div>
  </div>
</template>

<script>
import { LeftTree } from '@/components'
import { Splitpanes, Pane } from 'splitpanes'
import 'splitpanes/dist/splitpanes.css'
export default {
  name: 'ArchiveSpecial',
  components: {
    LeftTree,
    Splitpanes,
    Pane
  },
  data () {
    return {
      isShowLeftTree: false,
      treeData: [
        {
          title: '2018',
          key: '1'
        },
        {
          title: '2019',
          key: '2'
        },
        {
          title: '2020',
          key: '3',
          children: [
            {
              title: '1月',
              key: '4'
            },
            {
              title: '2月',
              key: '5'
            },
            {
              title: '3月',
              key: '6'
            },
            {
              title: '4月',
              key: '7'
            },
            {
              title: '5月',
              key: '8'
            },
            {
              title: '6月',
              key: '9'
            }
          ]
        }
      ],
      archiveTableData: [
        {
          Index: 1,
          FMType: '数据汇总以卷整理',
          TableName: '汇总档案案卷表',
          Code: '1999-JJ-001',
          Topic: '江西环境工程职业学院1989-2008年房屋所有权证',
          BGQXData: '永久',
          Security: '保密',
          CreateTime: '1959-12-01'
        },
        {
          Index: 2,
          FMType: '数据汇总以卷整理',
          TableName: '汇总档案案卷表',
          Code: '1999-JJ-002',
          Topic: '江西环境工程职业学院1989-2008年房屋所有权证',
          BGQXData: '永久',
          Security: '机密',
          CreateTime: '1969-12-01'
        },
        {
          Index: 3,
          FMType: '数据汇总以卷整理',
          TableName: '汇总档案案卷表',
          Code: '1999-JJ-003',
          Topic: '江西环境工程职业学院1989-2008年房屋所有权证',
          BGQXData: '永久',
          Security: '绝密',
          CreateTime: '1979-12-01'
        },
        {
          Index: 4,
          FMType: '数据汇总以卷整理',
          TableName: '汇总档案案卷表',
          Code: '1999-JJ-004',
          Topic: '江西环境工程职业学院1989-2008年房屋所有权证',
          BGQXData: '永久',
          Security: '秘密',
          CreateTime: '1989-12-01'
        }
      ],
      archiveColumns: [
        {
          title: '顺序号',
          field: 'Index'
        },
        {
          title: '归档方式',
          field: 'FMType'
        },
        {
          title: '表名',
          field: 'TableName'
        },
        {
          title: '档号',
          field: 'Code'
        },
        {
          title: '标题',
          field: 'Topic'
        },
        {
          title: '保管期限',
          field: 'BGQXData'
        },
        {
          title: '密级',
          field: 'Security'
        },
        {
          title: '创建日期',
          field: 'CreateTime'
        }
      ],
      fullTableData: [ // 全文表格数据
        {
          AI_Index: 1,
          AI_Name: '脊背.xls',
          AI_Size: 19456,
          AI_UploadDateTime: '2020-06-01',
          AI_FileDateTime: '2020-06-01',
          AI_IsOCR: ''
        },
        {
          AI_Index: 2,
          AI_Name: '案卷分类批量导出.xls',
          AI_Size: 6651819,
          AI_UploadDateTime: '2020-06-02',
          AI_FileDateTime: '2020-06-02',
          AI_IsOCR: ''
        },
        {
          AI_Index: 3,
          AI_Name: '卷内目录.xls',
          AI_Size: 13824,
          AI_UploadDateTime: '2020-06-03',
          AI_FileDateTime: '2020-06-03',
          AI_IsOCR: ''
        },
        {
          AI_Index: 4,
          AI_Name: '315066.jpg',
          AI_Size: 188803,
          AI_UploadDateTime: '2020-06-04',
          AI_FileDateTime: '2020-06-04',
          AI_IsOCR: ''
        }
      ],
      fullColumns: [ // 全文表格表头数据
        {
          title: '顺序号',
          field: 'AI_Index'
        },
        {
          title: '文件名',
          field: 'AI_Name'
        },
        {
          title: '文件大小',
          field: 'AI_Size'
        },
        {
          title: '上传时间',
          field: 'AI_UploadDateTime'
        },
        {
          title: '创建时间',
          field: 'AI_FileDateTime'
        },
        {
          title: 'OCR状态',
          field: 'AI_IsOCR'
        }
      ]
    }
  },
  created () {
  },
  mounted () {
  },
  methods: {
  }
}
</script>
<style lang="less" scoped>
.archive-special {
  width: 100%;
  height: 100%;
  padding: 10px 10px 0;
  background: #f0f2f5;
  .archive-right {
    float: left;
    width: 82%;
    height: 100%;
    transition: all 0.2s;
  }
}
</style>
